<template>
    <div>基本数据引用</div>
    <div>{{BaseStore.Obj}}</div>

    <br>
    <a-button type="" @click="BaseStore.addArr">调用 action</a-button>
    <div>调用Getter {{BaseStore.arrString}}</div>

    <div>显示修改的数据</div>
    <div>{{BaseStore.count}}</div>

</template>
<script setup>
import { onUnmounted } from 'vue';
import { useBaseStore } from './store'
const BaseStore = useBaseStore()

var Timer = setInterval(() => {
    BaseStore.count++
}, 1000);

// 注销组件事件
onUnmounted(() => {
    clearInterval(Timer);
})
</script>

<style lang="less" scoped>

</style>